#include "Usual.h"

template <class T>
void Insert_Sort (std::vector <T>& a, int num) {
	int i, j;
	T temp;
	for (i = 0; i < num; i++) {
		temp = a[i];
		for (j = i - 1; j >= 0 && a[j] > temp; j--)
			a[j + 1] = a[j];
		a[j + 1] = temp;

	}
}

int main () {
	int i = 0;
	std::vector <int> a(100);
	srand((int)time(0));
	for (i = 0; i < 100; i++)
		a[i] = random (0, 100);
	for (i = 0; i < 100; i++)
		std::cout << a[i] << ' ';
	std::cout << '\n';
	Insert_Sort(a, 100);
	for (i = 0; i < 100; i++)
		std::cout << a[i] << ' ';
	system("pause");
	return 0;

}

